<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>审批申请记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../component/elementUI/index.css">
    <link rel="stylesheet" href="../../../style/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <el-card style="background-color: white;">
            <el-form :inline="true" :form="form">
                <el-form-item label="提交时间:">
                    <div class="block">
                        <el-date-picker v-model="Start_Date" @change="onSerach" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
                            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                            :picker-options="pickerOptionsTwo">
                        </el-date-picker>
                    </div>
                </el-form-item>
                <el-form-item label="完成时间:">
                    <div class="block">
                        <el-date-picker v-model="End_Date" @change="onSerach" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
                            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                            :picker-options="pickerOptionsTwo">
                        </el-date-picker>
                    </div>
                </el-form-item>
                <el-form-item label="审批状态:">
                    <el-select filterable @change="onSerach" v-model.trim="form.End_State">
                        <el-option label="全部" value=""></el-option>
                        <el-option label="审批中" value="1"></el-option>
                        <el-option label="已通过" value="1"></el-option>
                        <el-option label="已驳回" value="1"></el-option>
                        <el-option label="已撤销" value="1"></el-option>
                        <el-option label="通过后撤销" value="1"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="申请人:">
                    <el-input placeholder="搜索成员姓名" clearable @change="onSerach" v-model.trim="form.Founder"></el-input>
                </el-form-item>
                <el-form-item label="审批编号:">
                    <el-input placeholder="请输入" clearable @change="onSerach" v-model.trim="form.Approval_Record_SerialNumber"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="success" @click="onExcel">导出记录</el-button>
                </el-form-item>
            </el-form>
            <el-table :data="tableData" id="out-table" stripe border style="width: 100%" height="calc(100vh - 230px)">
                <el-table-column align="center" label="序号" width="50" type="index"></el-table-column>
                <el-table-column align="center" prop="Approval_Record_SerialNumber" label="审批编号"></el-table-column>
                <el-table-column align="center" prop="Launch_Time" label="提交时间"></el-table-column>
                <el-table-column align="center" prop="End_Time" label="完成时间"></el-table-column>
                <el-table-column align="center" prop="ID_Name" label="申请人"></el-table-column>
                <el-table-column align="center" prop="Function_Approval_Name" label="功能类型"></el-table-column>
                <el-table-column align="center" prop="Approval_Info_Name" label="适用模板"></el-table-column>
                <el-table-column align="center" prop="End_State" label="审批状态">
                    <template v-slot="{row}">
                        {{Status(row.End_State)}}
                    </template>
                </el-table-column>
                <el-table-column align="center" label="操作" width="180">
                    <template v-slot="{row}">
                        <el-button type="primary" size="small"
                            @click="Show(row.Approval_Record_SerialNumber)">查看</el-button>
                        <el-button type="danger" size="small" @click="Delete(row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination style="margin-top: 5px;" background v-show="total > 0" @size-change="handleSizeChange"
                @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10, 20, 30, 50]"
                :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
            </el-pagination>
        </el-card>
    </div>
    <script type="text/javascript" src="../../../utils/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../../component/elementUI/index.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.min.js"></script>
    <script type="text/javascript" src="../../../utils/FileSaver.js"></script>
    <script type="text/javascript" src="../../../utils/xlsx.full.min.js"></script>
    <script type="text/javascript" src="../../../utils/utils.js"></script>
    <script type="text/javascript" src="js/ApprovalRecords.js"></script>
</body>

</html>